<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin:0;
            padding: 0;
            text-decoration: none;
            list-style: none;
        }  
        .box{
            width: 100px;
            height:100px;
            margin:0 auto;
            margin-top: 100px;
            display: flex;
            position: relative;
            transform-style: preserve-3d;
            transform: rotateX(45deg) rotateY(45deg);
            transition: all 5s ease;
        }   
        .box:hover{
            /* transform-origin: center center ; */
            transform:rotateX(1080deg) rotateY(1080deg)  rotateZ(1080deg);
        }
        .boxson{
            width: 100px;
            height: 100px;
            padding: 10px;
            background-color:#fff;
            opacity: 0.95;
            border: 1px solid #000;
            border-radius: 10px;
            display:flex;
            position: absolute;
            /* top: 150px; */
            /* left:100px; */
        }
        .boxson:nth-child(1){

            transform: translateZ(61px);
        }
        .boxson:nth-child(6){
            transform: translateZ(-61px);
        }
        .boxson:nth-child(2){
            transform: rotateY(90deg) translateZ(61px);
        }
        .boxson:nth-child(5){
            transform: rotateY(90deg) translateZ(-61px);
        }
        .boxson:nth-child(3){
            transform: rotateX(90deg) translateZ(61px);
        }
        .boxson:nth-child(4){
            transform: rotateX(90deg) translateZ(-61px);
        }
        .son{
            width: 20px;
            height: 20px;
            background-color: #000;
            border-radius: 50%;
        }
        .boxson:nth-child(1){
            justify-content: center;
            align-items: center;
        }
        .boxson:nth-child(2){
            flex-direction: column;
            justify-content:space-around;
            align-items: center;
        }
        .boxson:nth-child(3){
            justify-content:space-around;

        }
        .boxson:nth-child(3) .son:nth-child(2){
            align-self:center;
        }
        .boxson:nth-child(3) .son:nth-child(3){
            align-self:flex-end;
        }
        .boxson:nth-child(4){
            flex-direction:column;
            justify-content: space-around;
        }
        .boxson:nth-child(4) .flexbox{
            display: flex;
            justify-content: space-around;
            
        }
        .boxson:nth-child(5){
            flex-direction:column;
            justify-content: space-around;
        }
        .boxson:nth-child(5) .flexbox{
            display: flex;
            justify-content: space-around;
            
        }
        .boxson:nth-child(5) .flexbox:nth-child(2){
            align-self: center;
        }
        .boxson:nth-child(6){
            flex-direction:column;
            justify-content: space-around;
        }
        .boxson:nth-child(6) .flexbox{
            display: flex;
            justify-content: space-around;
            
        }

    </style>
</head>
<body>
    <div class="box">
        <div class="boxson">
            <div class="son"></div>
        </div>
        <div class="boxson">
            <div class="son"></div>
            <div class="son"></div>
        </div>
        <div class="boxson">
            <div class="son"></div>
            <div class="son"></div>
            <div class="son"></div>
        </div>
        <div class="boxson">
            <div class="flexbox">
                <div class="son"></div>
                <div class="son"></div>
            </div>
            <div class="flexbox">
                <div class="son"></div>
                <div class="son"></div>
            </div>
        </div>
        <div class="boxson">
            <div class="flexbox">
                <div class="son"></div>
                <div class="son"></div>
            </div>
            <div class="flexbox">
                <div class="son"></div>
            </div>
            <div class="flexbox">
                <div class="son"></div>
                <div class="son"></div>
            </div>
        </div>
        <div class="boxson">
            <div class="flexbox">
                <div class="son"></div>
                <div class="son"></div>
            </div>
            <div class="flexbox">
                <div class="son"></div>
                <div class="son"></div>
            </div>
            <div class="flexbox">
                <div class="son"></div>
                <div class="son"></div>
            </div>
        </div>
    </div>
</body>
</html>